package com.hdax.dm.api.order;

import com.hdax.dm.entity.order.Order;
import com.hdax.dm.entity.order.OrderLinkUser;
import com.hdax.dm.entity.scheduler.Scheduler;
import com.hdax.dm.entity.user.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "商品订单模块")
public interface OrderControllerApi {

    @PostMapping(path = "/order/addOrder")
    @ApiOperation(value = "新增订单",notes = "订单信息")
    boolean addOrder(@RequestBody Order order);

    @PostMapping(path = "/order/FindByOrderId")
    @ApiOperation(value = "根据订单号查看订单",notes = "订单信息")
    Order FindByOrderId(@RequestParam("orderNo") String orderNo);

    @PostMapping(path = "/order/addOrderLink")
    @ApiOperation(value = "新增订单详情",notes = "订单信息")
    boolean addOrderLink(@RequestBody OrderLinkUser orderLinkUser);

    @PostMapping(path = "/order/deleteOrderByNo")
    @ApiOperation(value = "删除订单",notes = "订单信息")
    Integer deleteOrderByNo(@RequestParam("orderNo") String orderNo);

    @PostMapping(path = "/order/updateTimeOutOrder")
    @ApiOperation(value = "订单修改状态",notes = "订单信息")
    Integer updateOrderType(@RequestParam("orderNo") String orderNo, @RequestParam("type") Integer type);

    @PostMapping(path = "/order/queryorderlist")
    @ApiOperation(value = "我的大觅订单查询",notes = "订单信息")
    List<Order> queryorderlist(@RequestParam("keyword") String keyword, @RequestParam("orderTime") Object orderTime, @RequestParam("orderType")  Object orderType, @RequestParam("userId") Long userId);

    @PostMapping(path = "/order/deleteticketbuyer")
    @ApiOperation(value = "删除常用联系人",notes = "常用联系人信息")
    boolean deleteticketbuyer(@RequestParam("linkId") Long linkId);

    @PostMapping(path = "/order/querypersoninfo")
    @ApiOperation(value = "查询个人资料",notes = "用户信息")
    User querypersoninfo(@RequestParam("userId") Long userId);

    @PostMapping(path = "/order/modifypersoninfo")
    @ApiOperation(value = "修改个人资料",notes = "用户信息")
    boolean modifypersoninfo(@RequestBody User user);

    @PostMapping(path = "/order/modifypersoninfo1")
    @ApiOperation(value = "修改个人资料头像",notes = "用户信息")
    boolean modifypersoninfo1(@RequestParam("id")Long id,@RequestParam("imgUrl") String imgUrl);

}
